<?php

/*
 * 测试单例模式
 */

namespace App\Controller;

use App\DesignPattern\Singleton\LogSingleton;


class ControllerSingleton {
	
	private function actionIndexAfter(){
		$log = LogSingleton::getInstance();
		$log->write("这是我第二次写入");
	}
	
	public function actionIndex(){
		$log = LogSingleton::getInstance();
		$log->write("这是我第一次写入");
		$this->actionIndexAfter();
	}
}
